##################################################################

# Gautam Nair
# gautam.nair@yale.edu
# Misperceptions of Relative Affluence and Support for International Transfers
# R Code converting main file into Stata format

##################################################################

rm(list=ls())
library(foreign)

setwd("/Users/Gautam/Dropbox/Yale/Other Activities/Global_Inequality_Redistribution/TESS/Data_Analysis/Nair_JOP_Replication_Files")
data <- read.spss("d_TESS3_186_Nair_Client.sav")
data <- as.data.frame(data)
names(data)

write.dta(data, "d_TESS3_186_Nair_Client.dta", version = 10,
          convert.dates = TRUE, tz = "GMT",
          convert.factors = c("labels", "string", "numeric", "codes"))